<html>
<head><meta charset="utf-8"><title>why DUMMY_SP · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/why.20DUMMY_SP.html">why DUMMY_SP</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225366197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/why%20DUMMY_SP/near/225366197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/why.20DUMMY_SP.html#225366197">(Feb 05 2021 at 22:23)</a>:</h4>
<p>Why do we have <code>DUMMY_SP</code> instead of explicitly using <code>Option&lt;Span&gt;</code>?</p>



<a name="225368527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/why%20DUMMY_SP/near/225368527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/why.20DUMMY_SP.html#225368527">(Feb 05 2021 at 22:49)</a>:</h4>
<p>a span can have no location information, but a non-root <code>SyntaxContext</code></p>



<a name="225368597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/why%20DUMMY_SP/near/225368597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/why.20DUMMY_SP.html#225368597">(Feb 05 2021 at 22:50)</a>:</h4>
<p><code>DUMMY_SP</code> can be thought of can an extension of that - no location information and a root <code>SyntaxContext</code></p>



<a name="225368612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/why%20DUMMY_SP/near/225368612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/why.20DUMMY_SP.html#225368612">(Feb 05 2021 at 22:50)</a>:</h4>
<p>so using <code>Option&lt;Span&gt;</code> would introduce multiple representations for the same concept</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>